package com.cxb.utils;

import android.content.Context;

public class Config {

	public final static String GOOGLE_MAP_PACKAGE_NAME = "com.google.android.apps.maps";
	public final static String GOOGLE_MAP_MAIN_ACTIVITY = "com.google.android.maps.MapsActivity";

	public final static boolean IS_MAP_IN_SDCARD = false;

	public final static int MAP_BAIDU = 0x01;// 百度度 导航
	public final static int MAP_AUTONAVI = 0x02;// 高德导航
	public final static int MAP_AUTOMAP = 0x03;// 高德地图
	public final static int MAP_AUTOMAP_CAR = 0x04;// 高德地图车机版本
	public final static int MAP_AUTOMAP_LITE = 0x05;// 高德地图后视镜版本
	public final static int MAP_GOOGLE_MAP = 0x06;// 谷歌地图
//	public final static int MAP_DEFAULT = MAP_AUTOMAP;// 默认地图

	public final static boolean NAVI_HISTORY_FROM_MAP = false;

	/**
	 * 
	 * @Description:是否支持翼卡
	 * @param @return
	 * @return boolean
	 * @throws
	 * @author 陈伟斌 2016-1-12
	 */
	public static boolean isEcardSupport(Context context) {

		return CommonUtils.isAppInstall(context, "com.coagent.ecar");
	}

	/**
	 * 
	 * @Description:是否支持语音识别
	 * @param @param context
	 * @param @return
	 * @return boolean
	 * @throws
	 * @author 陈伟斌 2016-3-2
	 */
	public static boolean isRecognizeSupport(Context context) {

		return CommonUtils.isAppInstall(context, "com.unisound.unicar.gui");
	}

	public static int getMapDefault(Context context) {

		if(CommonUtils.isAppInstall(context, Config.GOOGLE_MAP_PACKAGE_NAME)){
			return MAP_GOOGLE_MAP;
		}else if (CommonUtils.isAppInstall(context, "com.autonavi.xmgd.navigator")) {
			return MAP_AUTONAVI;
		} else if (CommonUtils.isAppInstall(context, "com.autonavi.minimap")) {
			return MAP_AUTOMAP;
		} else if (CommonUtils.isAppInstall(context, "com.baidu.navi")) {
			return MAP_BAIDU;
		}else if (CommonUtils.isAppInstall(context, "com.autonavi.amapauto")) {
			return MAP_AUTOMAP_CAR;
		}else if (CommonUtils.isAppInstall(context, "com.autonavi.amapautolite")) {
			return MAP_AUTOMAP_LITE;
		}
		return MAP_AUTOMAP;

	}
}
